package com.arithmetic.search;

import org.junit.jupiter.api.Test;

/**
 * @author chenyichang
 * @since 2022/8/17
 */
public class SearchArithmeticTest {

    static int[] nums = new int[]{0, 1};

    @Test
    public void FindTest() {
        System.out.println(new int[]{241, 348, 801, 822, 1204, 1438, 1917, 1954, 2030, 2253, 2547, 2723, 3147, 3259, 3635, 3963, 4251, 4440, 4848, 5195, 5264, 5410, 5537, 5844, 6138, 6604, 6693, 6876, 7148, 7307, 7504, 7788, 7821, 7990, 8112, 8447, 8588, 8988, 9104, 9532, 9742, 10148, 10391, 10828, 11296, 11699, 12059, 12245, 12741, 12754, 13119, 13178, 13436, 13798, 14233, 14510, 14775, 15049, 15154, 15192, 15395, 15803, 15941, 16388, 16655, 16676, 16901, 17220, 17686, 18077, 18239, 18666, 18973, 19323, 19356, 19464, 19743, 19933, 20030, 20183, 20228, 20515, 20974, 21429, 21524, 21896, 22298, 22447, 22622, 23109, 23214, 23701, 24096, 24434, 24514, 24834, 25029, 25303, 25336, 25747, 26012, 26455, 26844, 27226, 27291, 27566, 27885, 28343, 28412, 28625, 28806, 29107, 29358, 29637, 29649, 29970, 30137, 30253, 30657, 31069, 31177, 31576, 31988, 32146, 32545, 32715, 32963, 32971, 33096, 33530, 33603, 33721, 34091, 34449, 34630, 34886, 35129, 35211, 35659, 36136, 36429, 36734, 36956, 37137, 37625, 37905, 37980, 38138, 38553, 38563, 38877, 38984, 39065, 39501, 39623, 40118, 40504, 40782, 40860, 41168, 41508, 41833, 42278, 42757, 43127, 43206, 43399, 43450, 43725, 43884, 44155, 44457, 44818, 44894, 45018, 45072, 45274, 45572, 45615, 45720, 45952, 46031, 46057, 46258, 46638, 47024, 47249, 47420, 47582, 47884, 48276, 48766, 48859, 48936, 49104, 49494, 49848, 49989, 50376, 50691, 50931, 51005, 51116, 51484, 51847, 52177, 52414, 52480, 52813, 53254, 53739, 54067, 54305, 54426, 54525, 54714, 54932}.length);
        int[][] nums = new int[][]{
                {1, 2, 8, 9},
                {2, 4, 9, 12},
                {4, 7, 10, 13},
                {6, 8, 11, 15}
        };
        System.out.println(SearchArithmetic.Find(7, nums));
    }

    @Test
    public void searchTest() {
        System.out.println(SearchArithmetic.search(nums, 1));
    }
}
